package com.weixin.engine.daily.distribute;

import com.weixin.common.core.doman.Result;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author wangchunhui
 * @date 2022/10/25 9:54
 */
@Component
public class HandlerDispatch {

    @Resource
    public Map<String, Handler<Employee, Result>> handleMap;

//    public HandlerDispatch(Map<String, Handler<Req, Result>> handleMap) {
//        this.handleMap = handleMap;
//    }

//    public void setHandleMap(Map<String, Handler<Req, Result>> handleMap) {
//        this.handleMap = handleMap;
//    }

    public Handler<Employee, Result> getHandle(String key) {
        return handleMap.get(key);
    }
}
